﻿using Demo.Identity.Permissions.Dto;
using Demo.Identity.Permissions.Entities;

namespace Demo.Identity.Permissions;

public static class PermissionProfileExtensions
{
    /// <summary>
    /// 创建权限领域相关实体映射关系
    /// </summary>
    /// <param name="profile"></param>
    public static void CreatePermissionsMap(this IdentityApplicationAutoMapperProfile profile)
    {
        profile.CreateMap<SysPermission, PermissionTreeDto>();
        profile.CreateMap<SysPermission,SysPermissionDto>();
        profile.CreateMap<SysPermissionDto,SysPermission>();
    }
}